<div id="page-heading"><h1><?php echo $group->description; ?></h1></div>
<?php $this->load->view('partials/notices'); ?>
<?php if ($group): ?>
<?php echo form_open('admin/users/permissions_group/'. $group->id, 'id="mainform"');?>
<table cellspacing="0" cellpadding="0" border="0" width="100%" id="product-table">
				<tbody>
				<tr>
					<th class="table-header-check"><a id="toggle-all" ></a> </th>
					<th class="table-header-repeat line-left"><a href="javascript:void(0);">Module</a></th>
					<th class="table-header-repeat line-left"><a href="javascript:void(0);">Roles</a></th>
				</tr>
				<?php foreach ($permisison_modules as $key => $module): ?>
				<tr <?php if($key%2 == 0):?>class="alternate-row"<?php endif;?>>
					<td><?php echo form_checkbox('modules[' . $module['slug'] . ']', TRUE, array_key_exists($module['slug'], $edit_permissions), 'id="'.$module['slug'].'"'); ?></td>
					<td><?php echo $module['name']; ?></td>
					<td>
					<?php if ( ! empty($module['roles'])): ?>
						<?php foreach ($module['roles'] as $role): ?>
							<?php echo form_checkbox('module_roles[' . $module['slug'] . ']['.$role.']', TRUE, isset($edit_permissions[$module['slug']]) AND array_key_exists($role, (array) $edit_permissions[$module['slug']])); ?>
							 <?php echo lang($module['slug'].'.role_'.$role);?>
						<?php endforeach; ?>
					<?php endif; ?>
					</td>
				</tr>
				<?php endforeach;?>
				</tbody>
</table>
<input type="submit" value="" class="form-submit" />
<?php echo form_close();?>

<?php else: ?>
	<div class="no_data file-folders">
		<p><?php echo lang('groups.no_groups');?></p>
	</div>
<?php endif; ?>